/* Copyright (c) 2010-2020 Vadim Surov.
 */
package com.srv.shared;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sencha.gxt.data.shared.loader.PagingLoadConfig;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;

/**
 * The RPC api available to the client. The asynchronous version that is used
 * directly by the client is {@link ServiceAsync}.
 *
 */

@RemoteServiceRelativePath("service")
public interface Service extends RemoteService {

	/**
	 * An exception that is thrown by the server whenever the current user is not
	 * logged in, or if the RPC requests an operation that cannot be carried out
	 * for the user (i.e. putting cards on someone else's set).
	 */
	@SuppressWarnings("serial")
	static class AccessDeniedException extends Exception {
	}

	/**
	 * @see Service#login()
	 * @param callback
	 */
	public LoginInfo login(String sessionKey, String runKey) throws AccessDeniedException;
	
	/**
	 * @see Service#getSetInfoList()
	 * @param callback
	 */
	public PagingLoadResult<SetInfo> getSetInfoList(PagingLoadConfig config);

}